
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Liquibook</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Jeff Schmitz">

    <!-- Le styles -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/liquibook.css" rel="stylesheet">
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
    </style>
    <link href="css/bootstrap-responsive.min.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
                    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
                                   <link rel="shortcut icon" href="../assets/ico/favicon.png">
  </head>

  <body>

    <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="index.html">Liquibook</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li><a href="index.html">Home</a></li>
              <li><a href="fast.html">Fast</a></li>
              <li><a href="flexible.html">Flexible</a></li>
              <li class="active"><a href="easy.html">Easy</a></li>
              <li><a href="get-started.html">Get Started</a></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container">

      <h1>Liquibook is Easy.  <span class="highlight">Kindergarten Easy</span></h1>
      <p>To be usable, Liquibook must be easy to integrate.  You need to:</p>

      <ul>
        <li>Create a class that implements the Order Interface</li>
        <li>Instantiate OrderBook and use interface</li>
        <li>Handle callbacks by overriding OrderBook::perform_callback()</li>
        <li>Either call OrderBook::perform_callbacks() in the calling thread, or signal a background thread to do it. </li>
      </ul>

      <h2>How do I...?</h2>

      <ul>
        <li>Use my Order class - Just bind your <i>pointer to order</i> type to the OrderBook template.</li>
        <pre>class MyOrderBook : public OrderBook&lt;MyOrder*&gt; { ... }</pre>
        <li>Use shared pointers - just pass a shared pointer type as the OrderBook template argument.</li>
        <pre>typedef boost::shared_ptr<SimpleOrder> MyOrderPtr;
class MyOrderBook : public OrderBook&lt;MyOrderPtr&gt; { ... }</pre>
        <li>Track aggregate depth levels - instantiate Depth in your child OrderBook, and manipulate it in the callback handling, like impl::SimpleOrderBook does.</li>
        <pre>depth_.add_order(...);
depth_.fill_order(...);
depth_.close_order(...);
depth_.replace_order(...);
depth_.ignore_fill_qty(...);
</pre>
        <li>Track more than 5 depth levels - Just instantiate Depth with the number you want.</li>
        <pre>typedef book::Depth<10> MyDepth</pre>
        <li>Track BBO only - Just instantiate Depth with one level.</li>
        <pre>typedef book::Depth<10> MyBBO</pre>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ul>

    </div> <!-- /container -->

    <!-- Le javascript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery-1.9.1.min.js"></script>
    <scriprt src="js/bootstrap.min.js"></script>
  </body>
</html>
